#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<stack>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e5*2+1000;
typedef long long LL;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
struct P{
    char op;LL num;
}a[maxn];
stack<LL>s;
vector<LL>v;
int main(void)
{
  cin.tie(0);std::ios::sync_with_stdio(false);
  LL n;cin>>n;
  for(LL i=1;i<=2*n;i++){
     cin>>a[i].op;
     if(a[i].op=='+') a[i].num=-1;
     else if(a[i].op=='-') cin>>a[i].num;
  }
  for(LL i=2*n;i>=1;i--){
     if(a[i].op=='-'){
        if(s.empty()||s.top()>a[i].num) s.push(a[i].num);
        else if(!s.empty()&&s.top()<a[i].num){
            cout<<"NO"<<"\n";
            return 0;
        }
     }
     else if(a[i].op=='+'){
        if(s.empty()){
            cout<<"NO"<<"\n";
            return 0;
        }
        else{
            v.push_back(s.top());
            s.pop();
        }
     }
  }
  cout<<"YES"<<"\n";
  reverse(v.begin(),v.end());
  for(auto i:v){
    cout<<i<<" ";
  }
  cout<<"\n";
return 0;
}
